package top.xmj.service;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;
import top.xmj.domain.FriendBO;
import top.xmj.pojo.Friend;

import java.util.List;

/**
 * @author 冰咖啡
 * Date:2022/12/13 19:27
 * Description:
 */
@Service
public interface IFriendService {

    /**
     * 根据用户id查找好友
     * @param userId
     * @return
     */
    public List<FriendBO> getListByUserId(String userId);

    /**
     * 添加好友
     * @param userId
     * @param friendId
     * @return
     */
    public boolean addFriend(String userId,String friendId,String applyMsg);

    /**
     * 同意添加好友
     * @param userId
     * @param friendId
     * @return
     */
    public boolean agreeAddFriend(String userId,String friendId);

    /**
     * 删除好友
     * @param userId
     * @param friendId
     * @return
     */
    public boolean deleteFriend(String userId,String friendId);

    /**
     * 删除好友
     * @param userId
     * @param friendId
     * @return
     */
    public boolean rejectAddFriend(String userId, String friendId);

    /**
     * 根据用户名查找好友
     * @param username
     * @return
     */
    public FriendBO findFriendByUserName(String username);

    /**
     * 判断对方是否是好友
     * @param userId
     * @param friendId
     * @return
     */
    public boolean isFriend(String userId,String friendId);
}
